#include <iostream>
#include <vector>
#include <map>
#define MAX 100000
using namespace std;
int count=0;
double p,r,pmax = 0;
vector<vector<int>> v;
void dfs(int root,double price)
{
    if(v[root].size()==0)
    {
        if (price > pmax)
        {
            pmax = price;
            count = 1;
        }   
        else if (price == pmax)
        {
            count ++;
        }
    }
    else
    {
        price = price * (100 + r) / 100;
        for (int i = 0; i < v[root].size(); i ++)
        {
            dfs(v[root][i],price);
        }
    }
    
}
int main()
{
    int n,t,st;
    cin >> n >> p >> r;
    v.resize(n);
    for (int i = 0; i < n; i++)
    {
        cin >> t;
        if(t != -1)
            v[t].push_back(i);
        else
            st = i;
    }
    dfs(st,p);
    printf("%.2f %d",pmax,count);
    return 0;
}